#include <iostream>
#include <deque>
using namespace std;

int main() {
    int t = 0;
    cin >> t;
    cin.ignore();
    while (t--) {
        int n = 0;
        cin >> n;
        cin.ignore();
        int left = 1;
        int right = n;
        deque<int> ans;
        char s[101];
        for (int i = 0; i < n - 1; i++) {
            cin >> s[i];
        }
        for (int i = n-2; i >=0; i--) {
            if (s[i] == '>') {
                ans.push_front(right--);
            }
            else {
                ans.push_front(left++);
            }
        }
        ans.push_front(right);
        for (int i = 0; i < n; i++) {
            cout << ans[i] << ' ';
        }
        cout <<endl;
    }
    return 0;
}
